<h1>Listing events</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Event type</th>
    <th>Begin date</th>
    <th>End date</th>
    <th>Description</th>
  </tr>

<% for event in @events %>
  <tr>
    <td><%=h event.name %></td>
    <td><%=h event.event_type %></td>
    <td><%=h event.begin_date %></td>
    <td><%=h event.end_date %></td>
    <td><%=h event.description %></td>
    <td><%= link_to 'Show', event %></td>
    <td><%= link_to 'Edit', edit_event_path(event) %></td>
    <td><%= link_to 'Destroy', event, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New event', new_event_path %>
